<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@page import="java.sql.Connection"%>
<%@page import="java.sql.*"%>
<%@page import="java.sql.DriverManager"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>用户管理</title>
<link rel="stylesheet" href="css/manage.css" type="text/css">
<link rel="stylesheet" href="css/bootstrap.min.css" type="text/css">
<link rel="stylesheet" href="css/footer.css" type="text/css">
<link rel="stylesheet" href="css/top.css" type="text/css">
</head>
<body style="background-color:#eee;">
	<%@ include file="module/top.jsp"%>
	<div class="container" style="background-color: #ffffff;">
		<%
			boolean flag = false;
			request.setCharacterEncoding("utf-8");
		%>
		<%
			String driverClass = "com.mysql.jdbc.Driver";
			String url = "jdbc:mysql://localhost:3306/detecting_system?useUnicode=true&characterEncoding=utf-8";
			String user = "root";
			String password = "";
			Class.forName(driverClass);
		%>
		<div class="row">
			<div class="col-lg-1 col-md-1 hidden-xs"></div>
			<h3 class="text-center">用户删除</h3>
			<div class="col-sm-12 col-lg-12 col-md-12">
				<form class="form-horizontal" role="form" id="user_market"
					name="user_market" action="CRUD/market_management_delete.jsp" method="post">
					<div class="form-group">
						<label for="inputText1" class="col-sm-2 control-label">用户号</label>
						<div class="col-sm-10">
								<select name="user_id" class="form-control">
								<%
									try {
										ResultSet rs = null;
										Connection conn = null;
										PreparedStatement sql = null;
										conn = DriverManager.getConnection(url, user, password);
										Statement stmt = conn.createStatement();
										sql = conn.prepareStatement("select * from market_management");
										rs = sql.executeQuery();
										while (rs.next()) {
								%>
								<option value="<%=rs.getString(1)%>"><%=rs.getString(1)%></option>
								<%
									}
										sql.close();
										rs.close();
										conn.close();
										stmt.close();
									} catch (Exception ex) {
										ex.printStackTrace();
									}
								%>
							</select>
						</div>
						
					</div>
					<div class="form-group">
						<label for="inputText1" class="col-sm-2 control-label">店铺号</label>
						<div class="col-sm-10">
								<select name="market_id" class="form-control">
								<%
									try {
										ResultSet rs = null;
										Connection conn = null;
										PreparedStatement sql = null;
										conn = DriverManager.getConnection(url, user, password);
										Statement stmt = conn.createStatement();
										sql = conn.prepareStatement("select * from market_management");
										rs = sql.executeQuery();
										while (rs.next()) {
								%>
								<option value="<%=rs.getString(2)%>"><%=rs.getString(2)%></option>
								<%
									}
										sql.close();
										rs.close();
										conn.close();
										stmt.close();
									} catch (Exception ex) {
										ex.printStackTrace();
									}
								%>
							</select>
						</div>
						
					</div>
					<div class="form-group">
						<div class="col-sm-offset-2 col-sm-10">
							<button type="submit" class="btn btn-danger pull-right">删除</button>
						</div>
					</div>
				</form>
			</div>
		</div>
	</div>
	<script src="js/jquery-1.11.2.min.js" type="text/javascript"></script>
	<script src="js/bootstrap.js" type="text/javascript"></script>
</body>
</html>